<?php /* SVN: $Id: index.ctp 5572 2010-10-21 13:35:59Z aravindan_111act10 $ */ ?>
<div class="userPaypalConnections js-response index main-inner3">
<div class="banner-content banner-view-content clearfix">
	<div class="banner container_24">
			<div class="clearfix dashboard-content-block">

		<h2 class="project-title"><?php echo __l('PayPal Connections');?></h2>
		

<?php echo $this->element('users_edit-profile_link', array('config' => 'sec'));

echo $this->element('user-avatar', array('config' => 'sec')); 
?>
</div>

</div>
</div>
	
	<div class="container_24 space-top clearfix">
<div class="l-curve-top">							
		<div class="r-curve-top">
				<div class="top-bg"></div>
		</div>
						</div>
						<div class="shad-bg-lft clearfix">
							<div class="shad-bg-rgt">
								<div class="shad-bg">
								<div class="main-section">

<div class="clearfix">

<div class="grid_left"><?php echo $this->element('paging_counter');?></div>
	<div class="right-link grid_right">
	<?php echo $this->Html->link(__l('Add New Connection'), array('controller' => 'payments', 'action' => 'connect'), array('class' => 'add','title'=>__l('Add New Connection'))); ?>
</div>
</div>
<div class="content-info">
<?php echo sprintf('%s %s %s',__l('You can connect your PayPal account with'), Configure::read('site.name').'.', __l(' To connect your account, you\'ll be taken to paypal.com and once connected, you can make orders without leaving to paypal.com again. Note: We don\'t save your PayPal password and the connection is enabled through PayPal standard alone. Anytime, you can disable the connection.')); ?>
</div>
<table class="list">
    <tr>
        <th class="actions"><?php echo __l('Actions');?></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Created On'), 'created');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Paypal Email'),'sender_email');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Default?'), 'is_default');?></div></th>
    </tr>
<?php
if (!empty($userPaypalConnections)):

$i = 0;
foreach ($userPaypalConnections as $userPaypalConnection):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td class="actions dl">
		<div class="action-block">
                <span class="action-information-block">
                    <span class="action-left-block">&nbsp;&nbsp;</span>
                        <span class="action-center-block">
                            <span class="action-info">
                                <?php echo __l('Action');?>
                             </span>
                        </span>
                    </span>
                    <div class="action-inner-block">
                    <div class="action-inner-left-block">
                        <ul class="action-link clearfix">
        	<?php if (empty($userPaypalConnection['UserPaypalConnection']['is_default'])): ?>
			     <li><span><?php echo $this->Html->link(__l('Set as default'), array('action' => 'update', $userPaypalConnection['UserPaypalConnection']['id']), array('class' => 'update', 'title' => __l('Set as default')));?></span></li>
			<?php endif; ?>
            <li><span><?php echo $this->Html->link(__l('Delete'), array('action' => 'delete', $userPaypalConnection['UserPaypalConnection']['id']), array('class' => 'delete js-delete', 'title' => __l('Delete')));?></span></li>
			</ul>
    					</div>
    					<div class="action-bottom-block"></div>
    				  </div>
              </div>
        </td>
		<td><?php echo $this->Html->cDateTimeHighlight($userPaypalConnection['UserPaypalConnection']['created']);?></td>
		<td><?php echo $this->Html->cText($userPaypalConnection['UserPaypalConnection']['sender_email']);?></td>
		<td><?php echo $this->Html->cBool($userPaypalConnection['UserPaypalConnection']['is_default']);?></td>
	</tr>
<?php
    endforeach;
else:
?>
	<tr>
		<td colspan="14" class="notice">
			<?php echo __l('No PayPal Connections available');?>
		</td>
	</tr>	
<?php
endif;
?>
</table>
<div class="js-pagination">
    <?php
    if (!empty($userPaypalConnections)) {
        echo $this->element('paging_links');
    }
    ?>
</div>
</div>
	</div>
							</div>
						</div>
						<div class="l-curve-bot">							
							<div class="r-curve-bot">
								<div class="bot-bg"></div>
							</div>
						</div>
</div>
